#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
	int n, sum = 0;
	while (cin >> n) {
		if (n <= 0)
			break;
		if (n % 2 == 0)
			sum += n;
	}
	cout << sum;
	return 0;
}
